.class public Les/zk0;
.super Ljava/lang/Object;
.source "OpenAppUtils.java"


# direct methods
.method public static a(Landroid/content/Context;Landroid/net/Uri;)Les/wj0;
    .locals 3

    const/4 v0, 0x6

    if-eqz p0, :cond_4

    if-eqz p1, :cond_4

    .line 1
    invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v1

    const-string v2, "market"

    invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    goto :goto_0

    .line 2
    :cond_0
    :try_start_0
    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v1, v2, p1}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 3
    invoke-static {p0, v1}, Les/cl0;->a(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result p1

    if-nez p1, :cond_1

    .line 4
    new-instance p0, Les/wj0;

    const/4 p1, 0x1

    invoke-direct {p0, v0, p1}, Les/wj0;-><init>(II)V

    return-object p0

    .line 5
    :cond_1
    invoke-static {}, Lcom/ss/android/socialbase/downloader/m/i;->h()Ljava/lang/String;

    move-result-object p1

    .line 6
    invoke-static {p0, p1}, Les/cl0;->c(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_2

    invoke-static {}, Lcom/ss/android/socialbase/downloader/m/i;->e()Z

    move-result v2

    if-nez v2, :cond_2

    .line 7
    invoke-virtual {v1, p1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 8
    :cond_2
    instance-of p1, p0, Landroid/app/Activity;

    if-nez p1, :cond_3

    const/high16 p1, 0x10000000

    .line 9
    invoke-virtual {v1, p1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 10
    :cond_3
    invoke-virtual {p0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 11
    new-instance p0, Les/wj0;

    const/4 p1, 0x5

    invoke-direct {p0, p1}, Les/wj0;-><init>(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p0

    .line 12
    :catch_0
    new-instance p0, Les/wj0;

    invoke-direct {p0, v0}, Les/wj0;-><init>(I)V

    return-object p0

    .line 13
    :cond_4
    :goto_0
    new-instance p0, Les/wj0;

    invoke-direct {p0, v0}, Les/wj0;-><init>(I)V

    return-object p0
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;)Les/wj0;
    .locals 2

    if-eqz p0, :cond_2

    .line 14
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_0

    .line 15
    :cond_0
    invoke-static {}, Lcom/ss/android/socialbase/downloader/m/i;->e()Z

    move-result v0

    if-eqz v0, :cond_1

    const-string v0, "com.sec.android.app.samsungapps"

    invoke-static {p0, v0}, Les/cl0;->c(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 16
    invoke-static {p0, p1}, Les/zk0;->c(Landroid/content/Context;Ljava/lang/String;)Les/wj0;

    move-result-object p0

    return-object p0

    .line 17
    :cond_1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "market://details?id="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    invoke-static {p0, p1}, Les/zk0;->a(Landroid/content/Context;Landroid/net/Uri;)Les/wj0;

    move-result-object p0

    return-object p0

    .line 18
    :cond_2
    :goto_0
    new-instance p0, Les/wj0;

    const/4 p1, 0x6

    invoke-direct {p0, p1}, Les/wj0;-><init>(I)V

    return-object p0
.end method

.method public static a(Ljava/lang/String;)Les/wj0;
    .locals 7

    .line 24
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x2

    if-eqz v0, :cond_0

    .line 25
    new-instance p0, Les/wj0;

    const/4 v0, 0x3

    invoke-direct {p0, v1, v0}, Les/wj0;-><init>(II)V

    return-object p0

    .line 26
    :cond_0
    invoke-static {}, Les/lk0;->a()Landroid/content/Context;

    move-result-object v0

    .line 27
    invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    .line 28
    new-instance v3, Landroid/content/Intent;

    const-string v4, "android.intent.action.VIEW"

    invoke-direct {v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 29
    invoke-virtual {v3, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    const/high16 v2, 0x10000000

    .line 30
    invoke-virtual {v3, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 31
    invoke-static {v0, v3}, Les/cl0;->b(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result v0

    if-eqz v0, :cond_3

    .line 32
    invoke-static {}, Les/lk0;->i()Lorg/json/JSONObject;

    move-result-object v0

    const-string v4, "open_url_mode"

    invoke-virtual {v0, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v0

    const/16 v5, 0x1d

    const/4 v6, 0x1

    if-nez v0, :cond_1

    .line 33
    invoke-static {}, Les/lk0;->k()Les/hi0;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 34
    invoke-static {}, Les/lk0;->k()Les/hi0;

    move-result-object v0

    invoke-interface {v0}, Les/hi0;->a()Z

    move-result v0

    if-eqz v0, :cond_1

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    if-ge v0, v5, :cond_1

    .line 35
    invoke-static {p0}, Lcom/ss/android/downloadlib/activity/TTDelegateActivity;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 36
    :cond_1
    invoke-static {}, Les/lk0;->i()Lorg/json/JSONObject;

    move-result-object v0

    invoke-virtual {v0, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v6, :cond_2

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v4, 0x1a

    if-lt v0, v4, :cond_2

    if-ge v0, v5, :cond_2

    .line 37
    invoke-static {p0}, Lcom/ss/android/downloadlib/activity/TTDelegateActivity;->a(Ljava/lang/String;)V

    goto :goto_0

    :cond_2
    const-string v0, "open_url"

    .line 38
    invoke-virtual {v3, v0, p0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 39
    invoke-virtual {v3, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 40
    :try_start_0
    invoke-static {}, Les/lk0;->a()Landroid/content/Context;

    move-result-object p0

    invoke-virtual {p0, v3}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 41
    :goto_0
    new-instance p0, Les/wj0;

    invoke-direct {p0, v6}, Les/wj0;-><init>(I)V

    return-object p0

    .line 42
    :catch_0
    new-instance p0, Les/wj0;

    invoke-direct {p0, v1}, Les/wj0;-><init>(I)V

    return-object p0

    .line 43
    :cond_3
    new-instance p0, Les/wj0;

    invoke-direct {p0, v1}, Les/wj0;-><init>(I)V

    return-object p0
.end method

.method public static a(Ljava/lang/String;Ljava/lang/String;)Les/wj0;
    .locals 2

    .line 19
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 20
    invoke-static {}, Les/lk0;->a()Landroid/content/Context;

    move-result-object p0

    invoke-static {p0, p1}, Les/zk0;->b(Landroid/content/Context;Ljava/lang/String;)Les/wj0;

    move-result-object p0

    return-object p0

    .line 21
    :cond_0
    invoke-static {p0}, Les/zk0;->a(Ljava/lang/String;)Les/wj0;

    move-result-object p0

    .line 22
    invoke-virtual {p0}, Les/wj0;->a()I

    move-result v0

    const/4 v1, 0x2

    if-ne v0, v1, :cond_1

    .line 23
    invoke-static {}, Les/lk0;->a()Landroid/content/Context;

    move-result-object p0

    invoke-static {p0, p1}, Les/zk0;->b(Landroid/content/Context;Ljava/lang/String;)Les/wj0;

    move-result-object p0

    :cond_1
    return-object p0
.end method

.method public static b(Landroid/content/Context;Ljava/lang/String;)Les/wj0;
    .locals 3

    .line 1
    invoke-static {p0, p1}, Les/cl0;->e(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;

    move-result-object p1

    const/4 v0, 0x4

    if-nez p1, :cond_0

    .line 2
    new-instance p0, Les/wj0;

    invoke-direct {p0, v0}, Les/wj0;-><init>(I)V

    return-object p0

    :cond_0
    const/4 v1, 0x1

    const-string v2, "START_ONLY_FOR_ANDROID"

    .line 3
    invoke-virtual {p1, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 4
    :try_start_0
    invoke-virtual {p0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 5
    new-instance p0, Les/wj0;

    const/4 p1, 0x3

    invoke-direct {p0, p1}, Les/wj0;-><init>(I)V

    return-object p0

    .line 6
    :catch_0
    new-instance p0, Les/wj0;

    invoke-direct {p0, v0}, Les/wj0;-><init>(I)V

    return-object p0
.end method

.method private static c(Landroid/content/Context;Ljava/lang/String;)Les/wj0;
    .locals 3
    .param p0    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p1    # Ljava/lang/String;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    :try_start_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "http://www.samsungapps.com/appquery/appDetail.as?appId="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    .line 2
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string v1, "com.sec.android.app.samsungapps"

    const-string v2, "com.sec.android.app.samsungapps.Main"

    .line 3
    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 4
    invoke-virtual {v0, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 5
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 6
    new-instance p0, Les/wj0;

    const/4 p1, 0x5

    invoke-direct {p0, p1}, Les/wj0;-><init>(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p0

    .line 7
    :catch_0
    new-instance p0, Les/wj0;

    const/4 p1, 0x6

    invoke-direct {p0, p1}, Les/wj0;-><init>(I)V

    return-object p0
.end method
